﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCTinTuc.ascx.cs" Inherits="UControls_UCTinTuc" %>
<div class="KhoiXanhLa">Tin tức liên quan kim cương</div>
<asp:DataList ID="DataList1" runat="server" 
    Width="100%" DataSourceID="EntityDataSource1">
    <ItemTemplate>
        <asp:Image ID="hinh" runat="server" ImageAlign="Left"
        ImageUrl='<%# "~/Photos/BaiViet/"+Eval("HinhDaiDien") %>' Width="180px" 
            CssClass="imgMarginR" />
         <asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("TuaBaiViet") %>'  
        NavigateUrl='<%# "~/Pages/BaiViet.aspx?IDBaiViet="+Eval("BaiVietID") %>' CssClass="LinkBaiviet"></asp:HyperLink><br />
            <asp:Label ID="Label2" runat="server" 
            Text='<%# Eval("NgayCapNhat","{0:dd/MM/yyyy}") %>' ForeColor="#0033CC"></asp:Label><br />
        <asp:Label ID="Label1" runat="server" 
            Text='<%# Thuvien.CatTu(Eval("NoiDung").ToString(),100) %>'></asp:Label>
        
    </ItemTemplate>
</asp:DataList>
<asp:EntityDataSource ID="EntityDataSource1" runat="server" 
    ConnectionString="name=EDiamondEntities1" 
    DefaultContainerName="EDiamondEntities1" EnableFlattening="False" 
    EntitySetName="BaiViets" OrderBy="it.BaiVietID DESC skip 1 limit 4" 
    
    Select="it.[BaiVietID], it.[TuaBaiViet], it.[NoiDung], it.[HinhDaiDien], it.[NgayCapNhat]" 
    EntityTypeFilter="" Where="it.TheLoai=2">
</asp:EntityDataSource>
